<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:mo="https://gitee.com/aun/Timo"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">

<body>
<div class="layui-card">

    <div class="layui-card-header">
        <span class="layui-icon font-s10 color-desc margin-right-5"></span>字典管理
        <div class="pull-right">
            <button data-table-id="DictTable" class="layui-btn layui-btn-primary  layui-btn-sm" data-modal="/system/dict/form" data-height="500px" data-width="600px">
                <i class=" layui-icon layui-icon-addition"></i>添加字典</button>
        </div>
    </div>

    <div class="layui-card-line"></div>

    <div class="layui-card-body">

        <div class="layui-card-table layui-tab">
            <div class="layui-tab-content">

                <table id="DictTable" data-url="/system/dict/index"></table>
                <script type="text/javascript" th:inline="none">
                    $(function () {
                        $('#DictTable').layTable({
                            even: true, height: 'full',
                            cols: [[
                                {field: 'name', title: '字典标识', minWidth: 180, align: 'center'},
                                {field: 'title', title: '字典标题', align: 'center'},
                                {field: 'value', title: '字典值', align: 'center'},
                                {toolbar: '#toolbar', title: '操作', align: 'center', minWidth: 50, fixed: 'right'}
                            ]]
                        });
                    });
                </script>

                <script type="text/html" id="toolbar">
                    <a class="layui-btn layui-btn-sm" data-title="编辑" data-height="500px"  data-modal='/system/dict/form?id={{d.id}}'>编 辑</a>
                    <a class="layui-btn layui-btn-sm layui-btn-danger" data-confirm="确定要删除字典吗？" data-action="/system/dict/remove" data-value="id#{{d.id}}">删 除</a>
                </script>

            </div>
        </div>
    </div>

</div>

</body>
</html>